import request from '@/utils/request'

// 查询采购单信息列表
export function listBusPurchase (query) {
  return request({
    url: '/business/busPurchase/list',
    method: 'get',
    params: query
  })
}

// 查询采购单信息详细
export function getBusPurchase (id) {
  return request({
    url: '/business/busPurchase/' + id,
    method: 'get'
  })
}

// 新增采购单信息
export function addBusPurchase (data) {
  return request({
    url: '/business/busPurchase',
    method: 'post',
    data: data
  })
}

// 修改采购单信息
export function updateBusPurchase (data) {
  return request({
    url: '/business/busPurchase',
    method: 'put',
    data: data
  })
}

// 删除采购单信息
export function delBusPurchase (id) {
  return request({
    url: '/business/busPurchase/' + id,
    method: 'delete'
  })
}

// 导出采购单信息
export function exportBusPurchase (query) {
  return request({
    url: '/business/busPurchase/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/business/busPurchase/getInitData/' + dictTypes,
    method: 'get'
  })
}
